@extends('layouts.console_header')

@section('title', '代理商用户列表')

@section('resources')
    @parent
    <style>
        table{margin-top: 50px;}
        table tr td{width: 100px;height: 50px;}
    </style>
@endsection

@section('content')
<section class="user_list">
    <div style="border-bottom: 2px solid #9955c6;overflow: hidden;">
        <p class="fz_14 account_title fl" style="border: none;"><span style="color: #7f7f7f;">
        <a href="/console/index">首页</a>>用户后台管理></span><span class="co_violet">代理商用户列表</span></p>
        <a href="#"><p class="fr tc back_btn">导出</p></a>
        <a href="/console/admin/agent/add?cityid={{$cityid}}"><p class="fr tc back_btn">+新增</p></a>
    </div>
    <table id="example" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>序号</th>
                <th>姓名</th>
                <th>帐号</th>
                <th>类型</th>
                <th>代理城市</th>
                <th>创建时间</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            @foreach($lists as $list)
                <tr>
                @if(!isset($i))
                    <td>{{$i=1}}</td>
                @else
                    <td>{{++$i}}</td>
                @endif
                    <td>{{$list['realname']}}</td>
                    <td>{{$list['mobile']}}</td>
                    <td>市代</td>
                    <td>{{$list['cityname']}}</td>
                    <td>{{date('Y-m-d H:i', strtotime($list['created_at']))}}</td>
                @if($list['status'] == '1')
                    <td>可用</td>
                @else
                    <td>不可用</td>
                @endif
                    <td>
                        <a style="color: #9955c6;" href="/console/admin/agent/get?adminuserid={{$list['id']}}&cityid={{$cityid}}">修改</a> &nbsp;&nbsp;
                        <a style="color: red;" href="#">禁用</a>
                    </td>
                </tr>
            @endforeach
        </tbody>
    </table>
</section>
@endsection

@section('scriptResources')
    @parent

@endsection